{% extends "admin/change_form.html" %}
{% load i18n %}
{% load menu_tags %}
{% block after_field_sets %}
{{ block.super }}
{% if change %}
<br />
<h1>Menu options for this group</h1>
{% if has_add_permission %}
<ul class="object-tools">
  {% for id, name in menu_option_types %}
  <li>
    <a href="../../menuoption/add/{{ id }}/?menu_group={{ original.id }}{% if is_popup %}&_popup=1{% endif %}" class="addlink" onclick="return showAddAnotherPopup(this);">
      {% blocktrans with name as name %}Add {{ name }}{% endblocktrans %}
    </a>
  </li>
  {% endfor %}
</ul>
{% endif %}
<fieldset class="module">
  {% with original as group %}
    <table summary="Menu options available in the {{ group.name }} menu group.">
      <thead>
        <tr>
          <th>&#160;</th>
          <th>Option type</th>
          <th>Show to Anonymous</th>
          <th>Show to Authenticated</th>
          <th>Show to Staff</th>
        </tr>
      </thead>
      <tbody>
      {% admin_menu_as_tag group %}
      </tbody>
    </table>
    {% if not forloop.last %}
      <br />
    {% endif %}
  {% endwith %}
</div>
{% endif %}
{% endblock %}
